[test](regression) Add malformed percent-encoding test cases for url_decode#64645
[test](regression) Add malformed percent-encoding test cases for url_decode#64645yifanwu-sys wants to merge 1 commit into
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
Thanks for the reminder. I have clarified the PR description below. What problem was fixed?This PR does not change the implementation behavior of The existing
Without these regression tests, the existing error behavior of How was it fixed?I added 6 error-case tests to: The added cases include: select url_decode('%2');
select url_decode('%');
select url_decode('hello%');
select url_decode('%GG');
select url_decode('%20%GG%41');
select url_decode('%%20');Each case verifies that malformed percent-encoding raises the expected error: Which behaviors were modified?No Doris runtime behavior was modified. Before this PR:
After this PR:
Why was it modified?Malformed URL percent-encoding is a common edge case for URL decoding functions. Adding regression tests helps document and protect the expected error behavior. Possible impactThis is a test-only change. It does not affect:
New featuresNo new feature was added. RefactoringNo code was refactored. OptimizationNo function was optimized. This PR only adds regression test coverage for existing VerificationThis PR only adds constant SQL error assertion cases. The added cases verify that malformed percent-encoding inputs raise: No core code was modified, and no |
What problem does this PR solve?
The
url_decoderegression test mainly covers valid URL decoding cases, but malformed percent-encoding inputs are not explicitly covered.Malformed inputs such as truncated percent sequences or invalid hex characters should return an error. Without regression coverage, this behavior may be changed accidentally in future updates.
What is changed?
This PR adds regression test cases for malformed percent-encoding inputs in
test_url_decode.groovy, including:'%2''%''hello%''%GG''%20%GG%41''%%20'Each case verifies that
url_decoderaises the expected error:Behavior change
No behavior is changed.
This PR only adds regression test coverage for the existing error behavior of
url_decode.Impact
Test-only change. It does not affect build behavior, runtime behavior, SQL execution logic, storage behavior, or compatibility.
Check
url_decoderegression test..outfile update is required because these are error assertion cases.